/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package geometria;

/**
 *
 * @author 1-DAM
 */
public class Circulo {
    private double radio;
    private double longcirc;
    private double areacirc;
        
    // constructor sin parámetros
    
    /**
     *
     */
    public Circulo()
    {}
    
    /**
     *
     * @param radio
     */
    public Circulo (double radio)
    {
        setRadio(radio);
        CalculaLongcirc ();
        CalculaArea();        
    }

    /**
     * @return the lado
     */
    public double getRadio() {
        return radio;
    }

    /**
     * @param radio 
     */
    public void setRadio(double radio) {
        this.radio = radio;
    }

    /**
     * @return the area
     */
    public double getArea() {
        return areacirc;
    }
        /**
     * @param areacirc the areacirc to set
     */
    public void setArea(double areacirc) {
        this.areacirc = areacirc;
    }
    
    
        /**
     *
     */
    public void CalculaArea (){
        setArea(Math.PI *Math.pow(radio, 2));
        }
    /**
     * @param longcirc 
     */
        public void setLongcirc(double longcirc) {
        this.longcirc = longcirc;
        }
        
    /**
     *
     * @return
     */
    public double getLongcirc() {
        return longcirc;
    }
    
    /**
     *
     */
    public void CalculaLongcirc ()
    { setLongcirc (2* Math.PI *radio);
    }

        /**
     *
     */
    public void MostrarDatos()
    {
        System.out.println("Long. radio = "+ getRadio());
        System.out.println("Perímetro = "+ getLongcirc());
        System.out.println("Area = "+ getArea()+"\n");
    }
    
}
